package org.example.ui;

import org.apache.ibatis.session.SqlSession;
import org.example.entity.Grade;
import org.example.mapper.GradeMapper;
import org.example.util.MyBatisUtil;

import java.util.List;

public class GetAllGrades {
    public static void main(String[] args) {
        SqlSession sqlSession= MyBatisUtil.getSession();
        GradeMapper gradeMapper=sqlSession.getMapper(GradeMapper.class);
        List<Grade> grades= gradeMapper.getAllGrades();
        for(Grade grade:grades){
            System.out.println(grade.toString());
        }
    }
}
